package cn.mifengkong.appcommon.webview.jshandler;

import com.mifengkong.frtools.jsbridge.CallBackFunction;
import com.mifengkong.frtools.jsbridge.JsHandler;

import cn.mifengkong.appcommon.webview.listener.JsBridgeCallBackListener;

/**
 * Created by jack on 2017/10/16
 */

public class PostDataHandler implements JsHandler {

    private JsBridgeCallBackListener postDataListener;


    public PostDataHandler(JsBridgeCallBackListener listener) {
        this.postDataListener = listener;
    }

    @Override
    public void OnHandler(String handlerName, String responseData, CallBackFunction function) {
        if (postDataListener != null)
            postDataListener.postData(responseData);

    }
}
